<template>
	<view class="topic-list u-f animated fadeInLeft fast" @click="openDetail">
		<image :src="item.titlepic" mode="widthFix" lazy-load></image>
		<view>
			<view>#{{item.title}}#</view>
			<view>{{item.desc}}</view>
			<view>动态 {{item.totalnum}} 今日 {{item.todaynum}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			item:Object,
			index:Number
		},
		methods:{
			openDetail(){
				uni.navigateTo({
					url: '../../pages/topic-detail/topic-detail?id=' + this.item.id
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topic-list {
		padding: 20rpx 0;
		border: 1rpx solid #EEEEEE;
		border-radius: 10rpx;
	
		image {
			width: 150rpx;
			height: 150rpx;
			border-radius: 10rpx;
			margin-right: 20rpx;
		}
	
		view {
			color: #9E9E9E;
	
			view:first-child {
				font-size: 32RPX;
				color: #333333;
			}
		}
	}
</style>
